home *** CD-ROM | disk | FTP | other *** search
/ Champak 45 / Vol 45.iso / games / escape.swf / scripts / DefineSprite_214 / frame_16 / DoAction.as
Encoding:
Text File  |  2005-08-23  |  739 b   |  29 lines

  1. this.stop();
  2. gun_cnt = 70;
  3. count = 10;
  4. this.onEnterFrame = function()
  5. {
  6.    if(count == 0)
  7.    {
  8.       tmp = Math.floor(Math.random() * 3) + 1;
  9.       chara = {target:tmp};
  10.       _global.depth = _global.depth + 1;
  11.       newname1 = "dangan" + _global.depth;
  12.       this.attachMovie("dangan",newname1,depth,chara);
  13.       count = 23;
  14.       _global.depth = _global.depth + 1;
  15.       newname1 = "dan0" + _global.depth;
  16.       props = {_x:15,_y:15};
  17.       this.attachMovie("dangan_0",newname1,depth,props);
  18.       _root.mySound.attachSound("s_dangan.wav");
  19.       _root.mySound.start([0,1]);
  20.    }
  21.    count--;
  22.    gun_cnt -= 1;
  23.    if(gun_cnt < 0)
  24.    {
  25.       _root.enemy.robo.gotoAndPlay("wait");
  26.       gotoAndStop(11);
  27.    }
  28. };
  29.